package com.maiji.cloud.service;

import com.baomidou.mybatisplus.service.IService;
import com.maiji.cloud.entities.login.AppUser;
import com.maiji.cloud.entities.login.DistributionRuleConfigEntity;
import com.maiji.cloud.entities.login.UserInfo;
import com.maiji.cloud.request.BaseDataReqDto;
import com.maiji.cloud.request.BaseInputDto;
import com.maiji.cloud.request.IdInputDto;
import com.maiji.cloud.request.ReqMetaData;
import com.maiji.cloud.request.login.*;
import com.maiji.cloud.request.shopingmall.DistributionLogListReqDto;
import com.maiji.cloud.response.BaseDataResDto;
import com.maiji.cloud.response.BaseMetaResDto;
import com.maiji.cloud.response.BaseResDto;
import com.maiji.cloud.response.login.*;

import java.text.ParseException;
import java.util.List;

public interface UserService extends IService<UserInfo> {
	/**
	 * 第一次使用app时设置个人信息
	 * @param setUserInfoReqDto
	 * @return
	 */
	public BaseResDto setingUserInfo(SetUserInfoReqDto setUserInfoReqDto)throws Exception;
	/**
	 * 获得用户信息
	 * @param maijiToken
	 * @return
	 */
	public UserInfoResDto getUserInfo(String maijiToken)throws Exception;


	public UserInfoResDto getUserInfoWithUserId(BaseInputDto<IdInputDto> inputDto)throws Exception;

	/**
	 * 记录当前体重
	 * @param recordWeightReqDto
	 * @return
	 */
	public BaseDataResDto<RecordWeightResData> recordWeight(RecordWeightReqDto recordWeightReqDto) throws Exception;

	/**
	 * 获得一个用户的所有的体重记录 
	 * @param maijiToken
	 * @return
	 */
	public WeightChangeLogListResDto getWeightChangeLogList(String maijiToken);
	
	/**
	 * 修改
	 * @param updateUserInfoReqDto
	 * @return
	 */
	public BaseResDto updateUserInfo(UpdateUserInfoReqDto updateUserInfoReqDto)throws Exception;
	/**
	 * 用户签到
	 * @param maijiToken
	 * @return
	 */
	public BaseDataResDto<UserSignListResData> userSignIn(String maijiToken)throws Exception;
	/**
	 * 获取签到记录
	 * @param maijiToken
	 * @return
	 */
	public UserSignListResDto getUserSignIn(String maijiToken)throws Exception;
	/**
	 * 获得连续签到积分
	 * @return
	 */
	public SignInDeployAllResDto getSignInDeployAll();
	/**
	 * 获得转发记录
	 * @param param
	 * @param maijiToken
	 * @return
	 */
	public ForwardingRecordsListResDto getforwardingRecordsList(BaseDataReqDto param, String maijiToken);
	/**
	 * 微信用户助力
	 * @param param
	 * @return
	 */
	public BaseResDto forwardingRecordsHelp(ForwardingRecordsHelpReqDto param);

	/**
	 * 转发
	 * @param param
	 * @param maijiToken
	 * @return
	 */
	public BaseResDto forwardingRecords(ForwardingRecordsReqDto param, String maijiToken);
	/**
	 * 统计分销用户数量
	 * @param param
	 * @param maijiToken
	 * @return
	 */
	public DistributionSumResDto getDistributionSum(DistributionLogListReqDto param, String maijiToken);
	/**
	 * 获得分销用户列表
	 * @param param
	 * @param maijiToken
	 * @return
	 */
	public DistributionUserListResDto getDistributionUserList(DistributionLogListReqDto param, String maijiToken);
	/**
	 * 记录阶段
	 * @param param
	 * @return
	 */

	BaseResDto recordStage(BaseDataReqDto<RecordStageReqDataDto> param, String maijiToken)throws Exception;
	/**
	 * 获取尿酮
	 * @param maijiToken
	 * @return
	 */
	public BaseDataResDto<List<WeightChangeLogResData>> getKetonuria(BaseDataReqDto<GetKetonuriaResData> param,
                                                                     String maijiToken)throws Exception;
	/**
	 * 记录尿酮
	 * @param param
	 * @param maijiToken
	 * @return
	 */
	public BaseResDto recordKetonuria(BaseDataReqDto<String> param, String maijiToken);

    BaseMetaResDto<List<UserInfoResData>> findAllMaijiUsers(MaijiUserFindAllReqData nickName, ReqMetaData metaData);

    BaseDataResDto<UserInfoResData> findUserInfo(String maijiToken);

	/**
	 *
	 * @param param
	 * @return
	 */
	public BaseDataResDto<AppUser> getAppUer(BaseDataReqDto<String> param);
	/**
	 * 查看当天是否有正在助力的减肥基金
	 * @param maijiToken
	 * @return
	 */
	public BaseDataResDto<IsHaveReduceWeightFundLogResData> isHaveReduceWeightFundLog(String maijiToken)throws Exception;
	/**
	 * 用户领取减肥基金
	 * @param param
	 * @param maijiToken 
	 * @return
	 * @throws Exception
	 */
	public BaseDataResDto<RecordWeightResData> userDrawReduceWeightFund(BaseDataReqDto<String> param, String maijiToken)throws Exception;
	
	/**
	 * 查看今天是否签到
	 * @param maijiToken
	 * @return
	 */
	public BaseDataResDto<Boolean> todaySignInResult(String maijiToken)throws Exception;
	/**
	 * 
	 * @param maijiToken
	 * @return
	 */
	public BaseDataResDto<MessageInfoResData> getUserStageMessageInfo(String maijiToken)throws Exception;
	
	public BaseDataResDto<String> confirmMessageOperation(BaseDataReqDto<Integer> param,String maijiToken);
	/**
	 * 设置支付密码
	 * @param param
	 * @param userId
	 * @return
	 */
	public BaseResDto setPayPassword(BaseDataReqDto<SetPayPasswordReqData> param, String userId);
	/**
	 * 修改支付密码
	 * @param param
	 * @param uuId
	 * @return
	 */
	public BaseResDto updatePayPassword(BaseDataReqDto<UpdatePayPasswordReqData> param, String userId);
	/**
	 * 校验支付密码
	 * @param param
	 * @param uuId
	 * @return
	 */
	public BaseDataResDto<Boolean> checkPayPassword(BaseDataReqDto<String> param, String userId);
	/**
	 * 分销配置
	 * @param param 
	 * @return
	 */
	public BaseResDto setDistributionRuleConfig(BaseDataReqDto<DistributionRuleConfigEntity> param);
	
	/**
	 * 结束麦吉之旅
	 * @param userId
	 * @return
	 */
	public BaseResDto endMaiji(String userId);
	/**
	 * 开启麦吉之旅之后是否连续的记录体重
	 * @param maijiToken
	 * @return
	 */
	public BaseDataResDto<Boolean> isSuccessionRecordWeight(String maijiToken)throws Exception ;
	/**
	 * 是否长时间未登录
	 * @param maijiToken
	 * @return
	 */
	public BaseDataResDto<Boolean> isLongTimeNotLogIn(String maijiToken)throws Exception ;

}
